document.getElementById("updateName").onclick=function(){
    var updateName=document.getElementById("updateName");
    var text=document.getElementById("userName");
    var val=text.innerHTML;
    text.innerHTML="<input type='text' id='n' value="+val+" />";
    document.getElementById("n").addEventListener("blur",function(e){
        text.innerHTML=document.getElementById("n").value;
    });
};
